<meta charset=utf-8>
<style>
body { margin: 0px; }
canvas { width:100%; height:100%; overflow: hidden; }
</style>
<head><meta name="viewport" content="user-scalable=no,initial-scale=1,maximum-scale=1">
<script type="text/javascript" src="../h3du_min.js"></script>
<script type="text/javascript" src="demoutil.js"></script>
</head>
<body>
<canvas id=canvas></canvas>
<script id="demo">
/* global H3DU */
// <!--
/*
 Any copyright to this file is released to the Public Domain.
 http://creativecommons.org/publicdomain/zero/1.0/
 If you like this, you should donate
 to Peter O. (original author of
 the Public Domain HTML 3D Library) at:
 http://peteroupc.github.io/
*/
  var scene = new H3DU.Scene3D(document.getElementById("canvas"));
  scene.setClearColor("white");
  var sub = new H3DU.Batch3D();
  sub.getLights().setBasic();
  var mesh = new H3DU.Mesh()
    .mode(H3DU.Mesh.TRIANGLES)
    .normal3(0, 0, 1)
    .color3("red")
    .vertex2(0, 0.5)
    .color3("green")
    .vertex2(0.5, -0.5)
    .color3("blue")
    .vertex2(-0.5, -0.5);
  var sh = new H3DU.Shape(mesh);
  sub.addShape(sh);
  H3DU.renderLoop(function() {
    "use strict";
    scene.render(sub);
  });
// -->
</script>
</body>
